import router from "@router";
import { RouterProvider } from "react-router-dom";
import axios from "axios";
import { Provider } from "react-redux";
import store from "@store";

import { ConfigProvider } from "antd";
import { StyleProvider } from "@ant-design/cssinjs";

const App = () => {
  axios.get("/api/user/menu").then((res) => {
    console.log(res.data);
  });

  return (
    <>
      <StyleProvider layer>
        <ConfigProvider
          theme={{
            cssVar: true,
            token: {
              colorPrimary: "#7988FD",
            },
            components: {},
          }}
        >
          <Provider store={store}>
            <RouterProvider router={router}></RouterProvider>
          </Provider>
        </ConfigProvider>
      </StyleProvider>
    </>
  );
};

export default App;
